;Assembler header file for Territory
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:54 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 19 May 1995

        [       :LNOT: :DEF: Territory_Hdr
        GBLS    Territory_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
Territory_Current               *       &FFFFFFFF
Territory_UK                    *       &1
Territory_Master                *       &2
Territory_Compact               *       &3
Territory_Italy                 *       &4
Territory_Spain                 *       &5
Territory_France                *       &6
Territory_Germany               *       &7
Territory_Portugal              *       &8
Territory_Esperanto             *       &9
Territory_Greece                *       &A
Territory_Sweden                *       &B
Territory_Finland               *       &C
Territory_Denmark               *       &E
Territory_Norway                *       &F
Territory_Iceland               *       &10
Territory_Canada1               *       &11
Territory_Canada2               *       &12
Territory_Canada                *       &13
Territory_Turkey                *       &14
Territory_Arabic                *       &15
Territory_Ireland               *       &16
Territory_HongKong              *       &17
Territory_Russia                *       &18
Territory_Russia2               *       &19
Territory_Israel                *       &1A
Territory_Mexico                *       &1B
Territory_LatimAm               *       &1C
Territory_USA                   *       &30
Territory_IgnoreCase            *       &1
Territory_IgnoreAccent          *       &2
Territory_AlphabetBFont         *       &64
Territory_AlphabetLatin1        *       &65
Territory_AlphabetLatin2        *       &66
Territory_AlphabetLatin3        *       &67
Territory_AlphabetLatin4        *       &68
Territory_AlphabetCyrillic      *       &69
Territory_AlphabetArabic        *       &6A
Territory_AlphabetGreek         *       &6B
Territory_AlphabetHebrew        *       &6C
Territory_AlphabetLatin5        *       &6D
Territory_AlphabetWelsh         *       &6E
Territory_AlphabetLatin9        *       &70
Territory_AlphabetLatin6        *       &71
Territory_AlphabetCyrillic2     *       &78
Error_TerritoryBadSWI           *       &43062
Error_TerritoryUnknown          *       &190
Error_TerritoryUnknownAlphabet  *       &191
Error_NoTerritory               *       &192
Territory_GivenTime             *       &1
Territory_GivenDate             *       &2
Territory_GivenDateAndTime      *       &3
Territory_WriteRightToLeft      *       &1
Territory_WriteBottomToTop      *       &2
Territory_WriteVertical         *       &4
Territory_PropertyControl       *       &0
Territory_PropertyUppercase     *       &1
Territory_PropertyLowercase     *       &2
Territory_PropertyAlphabetic    *       &3
Territory_PropertyPunctuation   *       &4
Territory_PropertyWhitespace    *       &5
Territory_PropertyDigit         *       &6
Territory_PropertyHexDigit      *       &7
Territory_PropertyAccented      *       &8
Territory_PropertyForward       *       &9
Territory_PropertyReverse       *       &A
Territory_SymbolDecimalPoint    *       &0
Territory_SymbolGroupSeparator  *       &1
Territory_SymbolGroupingList    *       &2
Territory_SymbolInternationalCurrencySymbol *       &3
Territory_SymbolCurrencySymbol  *       &4
Territory_SymbolCurrencyPoint   *       &5
Territory_SymbolCurrencyGroupSeparator *       &6
Territory_SymbolCurrencyGroupList *       &7
Territory_SymbolCurrencyPlusSign *       &8
Territory_SymbolCurrencyMinusSign *       &9
Territory_SymbolInternationalCurrencyPrecision *       &A
Territory_SymbolCurrencyPrecision *       &B
Territory_SymbolCurrencySymbolPrecedesNonNegativeValue *       &C
Territory_SymbolCurrencySymbolSeparatedFromNonNegativeValue *       &D
Territory_SymbolCurrencySymbolPrecedesNegativeValue *       &E
Territory_SymbolCurrencySymbolSeparatedFromNegativeValue *       &F
Territory_SymbolCurrencyNonNegativeFormat *       &10
Territory_SymbolCurrencyNegativeFormat *       &11
Territory_SymbolListSeparator   *       &12
Territory_SymbolParenthesised   *       &0
Territory_SymbolSignPrecedes    *       &1
Territory_SymbolSignSucceeds    *       &2
Territory_SymbolSignImmediatelyPrecedes *       &3
Territory_SymbolSignImmediatelySucceeds *       &4

;Symbols for structure offsets and sizes
                                ^       0
                                #       Int
Territory_T                     *       @

                                ^       0
                                #       Bits
Territory_CollateFlags          *       @

                                ^       0
                                #       Int
Territory_AlphabetNumber        *       @

                                ^       0
Territory_Data_e                #       43*Ptr
Territory_Data                  *       @

                                ^       0
Territory_Ordinals_centisecond  #       Int
Territory_Ordinals_second       #       Int
Territory_Ordinals_minute       #       Int
Territory_Ordinals_hour         #       Int
Territory_Ordinals_date         #       Int
Territory_Ordinals_month        #       Int
Territory_Ordinals_year         #       Int
Territory_Ordinals_weekday      #       Int
Territory_Ordinals_yearday      #       Int
Territory_Ordinals              *       @

                                ^       0
Territory_PropertyTable_p       #       8*Bits
Territory_PropertyTable         *       @

                                ^       0
Territory_Calendar_first_working_day #       Int
Territory_Calendar_last_working_day #       Int
Territory_Calendar_month_count  #       Int
Territory_Calendar_day_count    #       Int
Territory_Calendar_pm_limit     #       Int
Territory_Calendar_we_limit     #       Int
Territory_Calendar_w3_limit     #       Int
Territory_Calendar_dy_limit     #       Int
Territory_Calendar_st_limit     #       Int
Territory_Calendar_mo_limit     #       Int
Territory_Calendar_m3_limit     #       Int
Territory_Calendar_tz_limit     #       Int
Territory_Calendar              *       @

                                ^       0
                                #       Bits
Territory_TimeStringFlags       *       @

                                ^       0
                                #       Bits
Territory_WriteFlags            *       @

                                ^       0
                                #       Int
Territory_CharacterProperty     *       @

                                ^       0
                                #       Int
Territory_SymbolNo              *       @

                                ^       0
                                #       Int
Territory_SymbolCurrencyNo      *       @


;Symbols for SWI's and SWI reason codes
XTerritory_Number               *       &63040
Territory_Number                *       &43040
   ;Exit
   ;  R0 = territory (Territory_T)

XTerritory_Register             *       &63041
Territory_Register              *       &43041
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> entries (Territory_Data)
   ;  R2 = workspace (pointer to Void)

XTerritory_Deregister           *       &63042
Territory_Deregister            *       &43042
   ;Entry
   ;  R0 = territory (Territory_T)

XTerritory_NumberToName         *       &63043
Territory_NumberToName          *       &43043
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = name (pointer to String)
   ;  R2 = size (Int)

XTerritory_Exists               *       &63044
Territory_Exists                *       &43044
   ;Entry
   ;  R0 = territory (Territory_T)

XTerritory_AlphabetNumberToName *       &63045
Territory_AlphabetNumberToName  *       &43045
   ;Entry
   ;  R0 = alphabet (Territory_AlphabetNumber)
   ;  R1 = name (pointer to String)
   ;  R2 = size (Int)

XTerritory_SelectAlphabet       *       &63046
Territory_SelectAlphabet        *       &43046
   ;Entry
   ;  R0 = territory (Territory_T)

XTerritory_SetTime              *       &63047
Territory_SetTime               *       &43047
   ;Entry
   ;  R0 -> date_and_time (OS_DateAndTime)

XTerritory_ReadCurrentTimeZone  *       &63048
Territory_ReadCurrentTimeZone   *       &43048
   ;Exit
   ;  R0 -> timezone (String)
   ;  R1 = offset (Int)

XTerritory_ConvertTimeToUTCOrdinals *       &63049
Territory_ConvertTimeToUTCOrdinals *       &43049
   ;Entry
   ;  R1 -> date_and_time (OS_DateAndTime)
   ;  R2 = ordinals (pointer to Territory_Ordinals)
   ;Exit
   ;  R0 corrupted

XTerritory_ConvertTextToString  *       &63075
Territory_ConvertTextToString   *       &43075

XTerritory_ReadTimeZones        *       &6304A
Territory_ReadTimeZones         *       &4304A
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> timezone (String)
   ;  R1 -> dst_timezone (String)
   ;  R2 = offset (Int)
   ;  R3 = dst_offset (Int)

XTerritory_ConvertDateAndTime   *       &6304B
Territory_ConvertDateAndTime    *       &4304B
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> date_and_time (OS_DateAndTime)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;  R4 -> format (String)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> end (Char)
   ;  R2 corrupted
   ;  R3 corrupted

XTerritory_ConvertStandardDateAndTime *       &6304C
Territory_ConvertStandardDateAndTime *       &4304C
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> date_and_time (OS_DateAndTime)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> end (Char)
   ;  R2 corrupted

XTerritory_ConvertStandardDate  *       &6304D
Territory_ConvertStandardDate   *       &4304D
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> date (OS_DateAndTime)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> end (Char)
   ;  R2 corrupted

XTerritory_ConvertStandardTime  *       &6304E
Territory_ConvertStandardTime   *       &4304E
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> time (OS_DateAndTime)
   ;  R2 = buffer (pointer to String)
   ;  R3 = size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> end (Char)
   ;  R2 corrupted

XTerritory_ConvertTimeToOrdinals *       &6304F
Territory_ConvertTimeToOrdinals *       &4304F
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> date_and_time (OS_DateAndTime)
   ;  R2 = ordinals (pointer to Territory_Ordinals)
   ;Exit
   ;  R0 corrupted

XTerritory_ConvertTimeStringToOrdinals *       &63050
Territory_ConvertTimeStringToOrdinals *       &43050
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = format (Territory_TimeStringFlags)
   ;  R2 -> t (String)
   ;  R3 = ordinals (pointer to Territory_Ordinals)
   ;Exit
   ;  R0 corrupted

XTerritory_ConvertOrdinalsToTime *       &63051
Territory_ConvertOrdinalsToTime *       &43051
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = buffer (pointer to OS_DateAndTime)
   ;  R2 -> ordinals (Territory_Ordinals)
   ;Exit
   ;  R0 corrupted

XTerritory_Alphabet             *       &63052
Territory_Alphabet              *       &43052
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 = alphabet (Territory_AlphabetNumber)

XTerritory_AlphabetIdentifier   *       &63053
Territory_AlphabetIdentifier    *       &43053
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> alphabet_name (String)

XTerritory_SelectKeyboardHandler *       &63054
Territory_SelectKeyboardHandler *       &43054
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 corrupted

XTerritory_WriteDirection       *       &63055
Territory_WriteDirection        *       &43055
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 = flags (Territory_WriteFlags)

XTerritory_CharacterPropertyTable *       &63056
Territory_CharacterPropertyTable *       &43056
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = property (Territory_CharacterProperty)
   ;Exit
   ;  R0 -> table (Territory_PropertyTable)

XTerritory_LowerCaseTable       *       &63057
Territory_LowerCaseTable        *       &43057
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> table (Char)

XTerritory_UpperCaseTable       *       &63058
Territory_UpperCaseTable        *       &43058
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> table (Char)

XTerritory_ControlTable         *       &63059
Territory_ControlTable          *       &43059
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> table (Char)

XTerritory_PlainTable           *       &6305A
Territory_PlainTable            *       &4305A
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> table (Char)

XTerritory_ValueTable           *       &6305B
Territory_ValueTable            *       &4305B
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> table (Char)

XTerritory_RepresentationTable  *       &6305C
Territory_RepresentationTable   *       &4305C
   ;Entry
   ;  R0 = territory (Territory_T)
   ;Exit
   ;  R0 -> table (Char)

XTerritory_Collate              *       &6305D
Territory_Collate               *       &4305D
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> s1 (String)
   ;  R2 -> s2 (String)
   ;  R3 = flags (Territory_CollateFlags)
   ;Exit
   ;  R0 = collate (Int)

XTerritory_ReadSymbols          *       &6305E
Territory_ReadSymbols           *       &4305E

XTerritory_ReadBooleanSymbols   *       &6305E
Territory_ReadBooleanSymbols    *       &4305E
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = symbol_no (Territory_SymbolNo)
   ;Exit
   ;  R0 = symbol (Bool)

XTerritory_ReadIntegerSymbols   *       &6305E
Territory_ReadIntegerSymbols    *       &4305E
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = symbol_no (Territory_SymbolNo)
   ;Exit
   ;  R0 = symbol (Int)

XTerritory_ReadStringSymbols    *       &6305E
Territory_ReadStringSymbols     *       &4305E
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = symbol_no (Territory_SymbolNo)
   ;Exit
   ;  R0 -> symbol (String)

XTerritory_ReadCalendarInformation *       &6305F
Territory_ReadCalendarInformation *       &4305F
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> date_and_time (OS_DateAndTime)
   ;  R2 = calendar (pointer to Territory_Calendar)
   ;Exit
   ;  R0 corrupted

XTerritory_NameToNumber         *       &63060
Territory_NameToNumber          *       &43060
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 -> name (String)
   ;Exit
   ;  R0 = territory_out (Territory_T)

XTerritory_TransformString      *       &63061
Territory_TransformString       *       &43061
   ;Entry
   ;  R0 = territory (Territory_T)
   ;  R1 = buffer (pointer to String)
   ;  R2 -> s (String)
   ;  R3 = size (Int)
   ;Exit
   ;  R0 = used (Int)

Service_TerritoryManagerLoaded  *       &64
   ;Entry
   ;  R1 = &64

Service_TerritoryStarted        *       &75
   ;Entry
   ;  R1 = &75

        ]
        END
